const path = require("path");
const fs = require("fs");
const chalk = require("chalk");
const express = require("express");
const app = express();

let config={
  port:1234
}

app.get("/*", function (req, res) {
  console.log(req.headers);
  console.log(req.url);
  res.send("测试接口");
});
app.get("/interface", function (req, res) {
  console.log(req.headers);
  console.log(req.url);
  res.send("interface");
});
app.listen(config.port, (err) => {
  if (err) {
    console.log(chalk.red(`http-server启动失败:【${err}】`));
    return;
  }
  console.log(chalk.green(`服务已在端口:【${config.port}】启动`));
});